package cn.iocoder.yudao.module.scrm.controller.admin.schedules.vo;

import cn.iocoder.yudao.module.scrm.annotations.FieldRepeatValidator;
import cn.iocoder.yudao.module.scrm.annotations.FieldRepeatValidators;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;

@Schema(description = "管理后台 - 排期客户新增/修改 Request VO")
@Data
@FieldRepeatValidators(tableName = "scrm_schedules_customer",idField = "id",fieldRepeatValidators = {
        //@FieldRepeatValidator(field = "name", property = "name",message = "姓名已经存在！"),
        @FieldRepeatValidator(field = "schedules_id", property = "schedulesId",type = "2"
                ,foreignKeyField = "customer_id",foreignKeyProperty = "customerList",message = "不能重复添加客户-手机号码不能重复！")
})
public class SchedulesCustomerSaveReqVO {

    @Schema(description = "排期ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6350")
    @NotNull(message = "排期ID不能为空")
    private Long schedulesId;

    @Schema(description = "客户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1836")
    @NotEmpty(message = "客户不能为空")
    private List<PersonInfo> customerList;

}